package cn.huiyunche.base.service.enums;

/**
 * 人送派单返回状态码解析
 *
 * @author hdy [Tuffy]
 */
public enum TmsDispatchOptionCodeEnum {

    DRIVER_INFO_ERROR(0, "获取司机关联信息失败"),//TMS

    DRIVER_WRONG_PHONE_NO(100, "司机手机号错误"),//TMS

    DRIVER_HAS_NO_IDCARD(101, "需要提供身份证号"),//TMS

    DRIVER_HAS_NO_PHONE_NO(102, "需要提供手机号"),//TMS

    DRIVER_UPDATE_INFO_ERROR(103, "读取/更新司机信息错误"),//TMS

    DRIVER_IS_NOT_TMS_DRIVER(104, "非知车司机，不可以安排"),//TMS

    DRIVER_HAS_NO_LICENSE(106, "司机确实缺少驾照类型"),

    DRIVER_LICENSE_NOT_MATCH(107, "驾照不匹配"),

    DRIVER_HAS_NO_INTENTIONA_LINE(108, "缺少意向线路"),

	DRIVER_LINE_NOT_MATCH(107, "线路不匹配"),

    DRIVER_IS_DISABLE(109, "司机不可用"),

	DRIVER_ALREADY_HAVE_WAYBILL(110, "已经有未完成的运单"),

    DRIVER_INFO_SYSTEM_ERROR(111, "系统司机信息错误"),

    NO_MENTION_ORDER(301, "没有找到该订单的提车单"),//TMS

    NO_TMS_ORDER(302, "该订单非人送订单，请确定数据"),//TMS

    NO_TMS_ORDER_TEAM(303, "该订单对应的指令不属于人送提车队，不可以安排"),//TMS

    IS_SEND_ORDER(304, "该订单已发车，不可以安排"),//TMS

    ADD_DRIVER_ERROR(305, "新增司机更换表 错误"),//TMS

    UPDATE_ORDER_ERROR(306, "更新指令错误"),//TMS

    ORDER_OIL_ERROR(307, "更新加油记录错误"),//TMS

	WAYBILL_VEHICLE_HAS_NO_LICENSE_BASE_DATA(308, "车型缺少准驾基础数据"),

    WAYBILL_IS_NULL(309, "运单为空"),

    WAYBILL_HAS_BEEN_SENT(310, "运单已经安排给其他司机"),

    WAYBILL_RECALC_COST_FAILED(311, "派单价格计算失败"),

    OK(200, "成功"),

    PUSH_DISPATCH_MSG(404, "推送派单信息错误"),
	
    FUEL_TYPE_ERROR(400, "油品类型错误");

    private final int value;
    private final String text;

    TmsDispatchOptionCodeEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static TmsDispatchOptionCodeEnum getByValue(int value) {
        for (TmsDispatchOptionCodeEnum temp : TmsDispatchOptionCodeEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
